package com.lkl.controller;

import com.lkl.entity.BaseResp;
import com.lkl.entity.TgGoods;
import com.lkl.service.TgGoodsService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * (TgGoods)表控制层
 *
 * @author makejava
 * @since 2022-04-08 10:33:06
 */
@RestController
@RequestMapping("tgGoods")
public class TgGoodsController {
    /**
     * 服务对象
     */
    @Resource
    private TgGoodsService tgGoodsService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public BaseResp selectOne(Integer id) {
        return this.tgGoodsService.queryById(id);
    }

    @RequestMapping("findAll")
    public BaseResp findAll(){
        return tgGoodsService.findAll();
    }

}